{% extends 'template.html' %}

{% block username %}
    {{ head.username }}
{% endblock %}

{% block content %}
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">{{ head.value }}</h1>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="btn-group">
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="row" id='table-data'>
                            <div class="col-lg-6">
                                <div class="container">
                                    <form role="form" class="form-horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-12 text-warning" for="TextArea">变更类型</label>
                                            <div class="col-sm-6">
                                                <select id="event" style="width: 100%">
                                                    <option value="0" selected="selected">领用</option>
                                                    <option value="1">入库</option>
                                                    <!--<option value="2">外借</option>-->
                                                    <option value="3">调拨</option>
                                                    <option value="4">回收</option>
                                                    <option value="5">清理</option>
                                                    <option value="6">损毁</option>
                                                    <option value="7">位置</option>
                                                    <option value="8">变卖</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-12 text-warning" for="TextArea">资产类型</label>
                                            <div class="col-sm-6">
                                                <select id="assets_type" style="width: 100%">
                                                    <option value="0" selected="selected">固定资产</option>
                                                    <option value="1">列管资产</option>
                                                    <option value="2">主机配件</option>
                                                    <option value="3">固定资产合并</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="form-group" id='scheme_after'>
                                            <div class="col-sm-2">
                                                <label class="text-warning">资产</label><br>
                                                <button id='myAdd' type='button' class='btn btn-sm btn-info'>添加
                                                </button>
                                            </div>
                                        </div>

                                        <!--<input type="" name="" placeholder="type something" id="test">-->

                                        <!--<div class="form-group" id='append_before'>
                                          <label class="col-sm-12 text-warning">位置和保管人</label>
                                        </div>
                                        <div class="form-group">

                                          <div class="col-sm-2">
                                            <label class="bg-danger text-white">目标位置</label>
                                          </div>

                                          <div class="col-sm-2">
                                            <label class="bg-danger text-white">目标保管人</label>
                                          </div>
                                        </div>
                                        <div class="form-group">

                                          <div class="col-sm-2">
                                            <select id="target_pos" class="pos" style="width: 100%">
                                              <option value="0" selected="selected">目标位置</option>
                                            </select>
                                          </div>

                                          <div class="col-sm-2">
                                            <select id="target_user" class="user" style="width: 100%">
                                              <option value="0" selected="selected">目标保管人</option>
                                            </select>
                                          </div>
                                        </div>-->
                                        <div class="form-group" id='data-table3'>
                                        </div>
                                        <div class="form-group" id='data-table2'>
                                            <div class="col-sm-6">
                                                <button type="button" class="btn btn-primary" id='bt-commit'>提交</button>
                                                <button type="button" class="btn btn-success" id='bt-create'>生成打印单</button>
                                            </div>
                                        </div>
                                    </form>
                                    <hr>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Modal -->
            <div class="modal fade" id="myModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h4 class="modal-title" id="myModalLabel"></h4>
                        </div>
                        <div class="modal-body">
                            <div class="alert alert-danger alert-dismissable" id='modal-notify'>
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true" id="bt-modal-notify">&times;</button>
                                <label id='lb-msg'></label>
                            </div>
                            <form class="form-horizontal" role="form" id='modal-data'>

                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button id='bt-save' type="button" class="btn btn-primary">保存</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->
            </div><!-- /.modal -->
        </div>
    </div>
{% endblock %}
{% block bodyjs %}
    {{ django_context_varable }}
    {% verbatim %}
    <script id="tpl" type="text/x-handlebars-template">
        {{#each func}}
        <button type="button" class="btn btn-{{this.type}} btn-sm" onclick="{{this.fn}}">{{this.name}}</button>
        {{/each}}
    </script>
    {% endverbatim %}
    <script src="/static/js/handlebars-v3.0.1.js"></script>
    <script src="/static/js/jquery-ui.js"></script>
    <script type="text/javascript" src="/static/js/log_assets.js?v=20191211001"></script>
    <script src="/static/js/jquery.dataTables.js"></script>
    <script src="/static/js/jquery.toast.min.js"></script>
{% endblock %}
{% block css %}
    <link href="/static/css/jquery.toast.min.css" rel="stylesheet" type="text/css">
    <link href="/static/css/jquery.dataTables.css" rel="stylesheet" type="text/css">
    <link href="/static/css/jquery-ui.css" rel="stylesheet" type="text/css">
{% endblock %}
